home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / mmdf / mmdf43_docs / administrators / tables < prev    next >
Encoding:
Text File  |  1990-02-28  |  14.3 KB  |  405 lines

  1. .\".AU
  2. .\"Steve Kille
  3. .\".AI
  4. .\"Department of Computer Science
  5. .\"University College London
  6. .\".AB
  7. .\"The \*M mail system provides a flexible table structure to
  8. .\"allow (user) transparent connectivity to a large number of sites,
  9. .\"using multiple mail protocols and a mixture of direct and indirect
  10. .\"connections.   This document explains how set up these tables.
  11. .\".AE
  12. .bp
  13. .NH
  14. Configuring Tables for \*M
  15. .NH 2
  16. Introduction
  17. .PP
  18. This section explains how to construct the tables which are defined in the
  19. runtime tailoring file.  The exact syntax of the tables is documented in
  20. tables(5).  
  21. It is assumed that most sites will be in one of a fairly small number of
  22. standard situations regarding mail connectivity.  It is suggested that
  23. the simplest approach for most sites will be to base the configuration
  24. on that of a site in a similar situation.  For this reason, we supply
  25. a number of sample configurations.  For a given sample site \fIfoo\fR, 
  26. the runtime tailoring file and its associated tables are contained in
  27. the directory \fBsamples/\fIfoo\fR.  
  28. .PP
  29. The current sample configurations are:
  30. .RS
  31. .IP bbn 12
  32. A 4.2BSD Internet host using domain servers.
  33. .IP vgr 12
  34. A 4.2BSD Internet host with heavy mail traffic.
  35. .IP uclvax2 12
  36. An Internet host with links to various UK networks; illustrates
  37. authorization on a per-user basis.
  38. .IP 4.3vax 12
  39. A 4.3BSD workstation on an ethernet.  Offloads remote
  40. traffic to another host.
  41. .IP csnet-relay 12
  42. A very large PhoneNet relay host with Internet access.
  43. .IP okstate 12
  44. A V7 Perkin-Elmer host on CSNET PhoneNet, UUCP and a local network.
  45. .IP vu44 12
  46. A System V Release 0 based 68000 workstation.  One UUCP link to a
  47. gateway host.  It pretends its name is that of the gateway to
  48. hide its actual name (laser) from the rest of the world.  Unknown hosts
  49. and users are passed to the gateway.
  50. .IP dial_scripts
  51. Various samples of PhoneNet dialout scripts.
  52. .RE
  53. .PP
  54. A basic word about the tables for domains and channels is in order.
  55. The tables may appear similar, but they serve very different functions.
  56. The host lookup procedure is a two-tier process.
  57. A destination is first looked up in the domain tables.
  58. \*M need not find an exact match, a match on a partial domain reference
  59. will also succeed, although the full domain match will be attempted first.
  60. When a match is found in the domain tables, the RHS (right hand side) will
  61. have the full domain specification of a host to which the message should
  62. be passed to reach the destination (in many cases this IS the destination).
  63. That host is then looked up in the channel tables, searching in the order
  64. the channels were defined.
  65. The channel tables contain host names (full domain form) on the LHS and 
  66. typically addressing data on the RHS.
  67. Sometimes addressing data does not make sense (like in the local channel)
  68. and some fixed string is substituted.  (See the addressing document for more
  69. information about the domain matching process).
  70. .PP
  71. In the examples here, the RHS and the LHS are separated by a colon
  72. and some white space.  The colon is in fact optional.  You may find the
  73. colon missing from many of the sample files.
  74. .NH 2
  75. Setting Up Domain Tables
  76. .PP
  77. Domain tables are themselves specified by a domain.  When the
  78. domain of a table
  79. is concatenated with the LHS of any entry in the table, a
  80. domain must result.
  81. On the RHS are HOST values.
  82. This two level hierarchy is intended as a compromise between
  83. efficiency and flexibility.   Domain tables are matched longest first.
  84. Take the `AC.UK' domain for example (United Kingdom, Academic community).
  85. Thus when matching `CS.CAMFORD.AC.UK', if a table "CAMFORD.AC.UK" is
  86. present this will be examined before "AC.UK".  If an entry `CAMFORD'
  87. was found in "AC.UK" (thus corresponding to domain `CAMFORD.AC.UK'),
  88. then it would be identified as a relay point.   If no domain table
  89. is identified, then the domain tables are searched in order.  In this
  90. case, if `CS.CAMFORD' were presented, tables would first be searched for
  91. CS.CAMFORD and then (if no match) for CAMFORD.  If the latter were found
  92. in "AC.UK", then `CAMFORD.AC.UK' would be identified as a relay domain
  93. for `CS.CAMFORD.AC.UK'.
  94. .PP
  95. Note that if #define BOTHEND is set, then this will work for both
  96. RFC 819 and NRS ordering (for those lucky enough to live in the UK).
  97. .PP
  98. The best place to start is with the "TOP" table which matches
  99. rooted domains.  It should contain the domain on the LHS and an
  100. appropriate gateway on the RHS (host name, using full domain notation).
  101. For example, on an ARPANET site it might be:
  102. .ne 8
  103. .nf
  104. .RS
  105. .TS
  106. l l .
  107. mailnet:    mit-multics.arpa
  108. bitnet:    wiscvm.arpa
  109. csnet:    csnet-relay.arpa
  110. uucp:    harvard.arpa
  111. ac.uk:    ucl-cs.arpa
  112. .TE
  113. .RE
  114. .fi
  115. .ne 7
  116. In the UK it might be:
  117. .nf
  118. .RS
  119. .TS
  120. l l .
  121. arpa:    ucl-cs.ac.uk
  122. csnet:    ucl-cs.ac.uk
  123. dec:    ucl-cs.ac.uk
  124. .TE
  125. .RE
  126. .fi
  127. Other domains will be given explicit tables, derived from various sources.
  128. There is a domain extension which can be useful. If
  129. domains are not directly
  130. connected, but require further verification (i.e. beyond the top
  131. level or two) the entry should be of the form:
  132. .sp
  133.     partial-domain:\ \ \ \ host.domain\ \ \.\.\.\ \ \ host.domain
  134. .sp
  135. Alternative partial domain names should contain a source route on the RHS
  136. from RIGHT TO LEFT.  The connect site is specified by the right-hand host.  
  137. For example, if EECS.SALBRIDGE.AC.UK is reached through
  138. CAMFORD.AC.UK, the entry in the ``AC.UK'' table would be:
  139. .sp
  140.     salbridge:\ \ \ \ salbridge.ac.uk\ \ \ camford.ac.uk
  141. .sp
  142. and would be suitable to route all mail destined for machines at
  143. Salbridge via Camford.
  144. .PP
  145. You can have multiple domain tables serving the same domain.  This is useful
  146. for when one table is actually a nameserver-type table and you want to either
  147. override it or provide a backup for it with a dbm-type table.  To do this, put
  148. multiple MDMN entries in your tailor file with the dmn= parameters set to the
  149. same value.  When looking up a name in a given domain, each MDMN entry whose
  150. dmn= value matches that domain will be used.  The lookup stops when the value
  151. is found in a table.  A nameserver timeout in one table will cause lookups to
  152. continue in the alternate table(s) but will still be treated as a nameserver
  153. timeout if all of the alternate lookups fail.  For example:
  154. .sp
  155.     MTBL\ \ TOP, file=rootdomain, show="Static root domain"
  156. .br
  157.     MTBL\ \ TOP-NS, show="The World via NS", flags=ns, flags=domain
  158. .sp
  159.     MDMN\ \ TOP, dmn=""
  160. .br
  161.     MDMN\ \ TOP-NS, dmn=""
  162. .sp
  163. In this example, "FOO.EDU" will be looked up in the TOP table (hashed from the
  164. rootdomain file) and, if it is not found there, the nameserver database will be
  165. queried.
  166. .NH 2
  167. Setting up Channel Tables
  168. .PP
  169. In section 3.9, a set of channels was determined.  Now the channel tables
  170. should be built.
  171. The LHS should contain the domain of the host served by that
  172. channel
  173. and the RHS should contain information used by the channel
  174. to connect to the host.
  175. The local channel requires the RHS to be the string specified by MLNAME (or
  176. .I locname
  177. from conf.c if it is not runtime tailored).
  178. The smtp channel, for example, requires the Internet
  179. address on the RHS of its channel table (e.g. "129.11.5.3").
  180. The phone and
  181. pobox channels don't use the RHS (but the RHS is typically set to the host
  182. name).
  183. .NH 2
  184. How to Modify a Standard Configuration
  185. .PP
  186. This section assumes that you have identified a suitable configuration
  187. on which to base your tables.  
  188. .NH 3
  189. Modifying Channel Tables
  190. .PP
  191. Each of the channels will have a set of hosts associated with it.
  192. All channel tables associated with external hosts should be usable
  193. as they stand.  The local channel table (used by both the local and
  194. list channels) should have at least the following two entries:
  195. .ne 12
  196. .nf
  197. .RS
  198. .TS
  199. l l .
  200. \fIlocname\fR.\fIlocdomain\fR:    \fIlocname\fR
  201. \fIlocname\fR:    \fIlocname\fR
  202. .TE
  203. .RE
  204. You may also need the entries with
  205. LHS \fIlocmachine.locname.locdomain\fR and \fIlocmachine\fR
  206. if you are going to hide a number of sites behind a single name.
  207. The RHS should still be \fIlocname\fR.
  208. For example for UFOO.CSNET with locmachine set to "VAX1":
  209. .RS
  210. .TS
  211. l l .
  212. ufoo.csnet:    ufoo
  213. ufoo:    ufoo
  214. vax1.ufoo.csnet:    ufoo
  215. vax1:    ufoo
  216. .TE
  217. .RE
  218. .fi
  219. .NH 3
  220. Modifying Domain Tables
  221. .PP
  222. Domain tables associated with a number of domains will be provided.
  223. All can be taken as given, except the table for the local domain.
  224. To this should be prepended all alternative names of \fIlocname\fR.
  225. The RHS of all these entries should be the fully qualified domain name
  226. for your host.
  227. The first entry in this table should be \fIlocname\fR:\fIlocname.locdomain\fR\ .
  228. Thus if UFOO.CSNET is also know as UBAR.CSNET and UPIG.CSNET, the first
  229. entries in the CSNET domain table should be:
  230. .ne 6
  231. .nf
  232. .RS
  233. .TS
  234. l l .
  235. ufoo:    ufoo.csnet
  236. ubar:    ufoo.csnet
  237. upig:    ufoo.csnet
  238. .TE
  239. .RE
  240. .fi
  241. .NH 3
  242. Alias Tables
  243. .PP
  244. The next step is to set up a small alias file.  Assuming your own
  245. login on UNIX to be ``bill'', the following initial file is suggested
  246. as a example:
  247. .ne 6
  248. .nf
  249. .RS
  250. .TS
  251. l l .
  252. root:    bill
  253. mmdf:    bill
  254. postmaster:    bill
  255. .TE
  256. .RE
  257. .fi
  258. In particular, the \*M \fIcheckup\fR program will check to see
  259. that an alias exists for ``postmaster'' and the \*M login
  260. you specified in the configuration (herein assumed to be ``mmdf'').
  261. It is suggested that one of the sample alias files be used as a model
  262. for the alias file organization.  To handle the expansion of a
  263. mailing-list ``foo'' from a file, the entries for the list ``foo''
  264. should be of the form:
  265. .ne 12
  266. .nf
  267. .RS
  268. .TS
  269. l l .
  270. foo:    foo-outbound@\fIlocname\fR@list
  271. foo-outbound:    :include:filename
  272. foo-request:    list-maintainer
  273. .TE
  274. .RE
  275. For example:
  276. .RS
  277. .TS
  278. l l .
  279. staff:    staff-outbound@ufoo@list
  280. staff-outbound:    :include:/etc/alias/staff
  281. staff-request:    bill
  282. .TE
  283. .RE
  284. .fi
  285. .NH 3
  286. User and Mail-ID Tables
  287. .PP
  288. The final step is to set up the User and Mail-ID tables.  This step is only
  289. necessary if you have enabled use of Mail-IDs.  The ``user'' table maps users to
  290. Mail-IDs.  For example:
  291. .RS
  292. .TS
  293. l l .
  294. wiz:    unix-wizards-request
  295. wiz2:    unix-wizards-request
  296. joe:    joe
  297. bob:    bob
  298. .TE
  299. .RE
  300. The ``mailids'' table maps Mail-IDs to users.  For example:
  301. .RS
  302. .TS
  303. l l .
  304. unix-wizards-request:    wiz
  305. joe:    joe
  306. bob:    bob
  307. .TE
  308. .RE
  309. In this example, mail addressed to ``unix-wizards-request'' would be delivered
  310. to user ``wiz''.  However, both users ``wiz'' and ``wiz2'' could send mail and
  311. the mail would appear to come from ``unix-wizards-request''.
  312. .NH 2
  313. How to Design Your Own Tables
  314. .PP
  315. This section is written for those who have the misfortune not to be
  316. able to base their design on one of the standard configurations, or
  317. who wish to make radical extensions to a standard configuration.
  318. Rather than attempting to
  319. describe many possibilities, it tries to explain what is being aimed at.
  320. .PP
  321. The terms DOMAIN and HOST are used here in a quite specific manner.
  322. The domain name space is assumed to be
  323. a global hierarchy with the most significant component on the RHS
  324. (with apologies to the long suffering UK Mailpeople who will have to
  325. live with back to front names).  Domains are implicitly fully
  326. qualified (i.e. extending to the root).  For example: UK, AC.UK,
  327. CAMFORD.AC.UK, and CS.CAMFORD.AC.UK are all domains.  CAMFORD is not
  328. a domain.  Domains are administrative entities and may be synonymous
  329. with a host.  A host is a computer
  330. to which your computer makes a direct connection.  
  331. The entries on the LHS of channel tables and
  332. RHS of domain tables are hosts.  All host names must be unique within
  333. a given system (to allow host -> channel lookup).
  334. A useful convention
  335. to ensure host uniqueness is to have the host name the same as the fully
  336. qualified domain.  This convention is also likely to facilitate the
  337. introduction of nameservers.
  338. .PP
  339. The key to remember is that the validation of an address is a two-fold
  340. operation.  First, the domain or a parent of it must be found in the
  341. domain tables (CS.CAMFORD.AC.UK, or CAMFORD.AC.UK, or AC.UK, or UK).
  342. Once it is found, the RHS will contain a host or route to a host.
  343. The second step is to try and find/verify the route to the host by
  344. looking up the host or route elements in the various channel tables.
  345. The basic premise is that you should be able to find hosts specified in
  346. the RHS of a domain table by looking in the LHS of channel tables.
  347. .NH 2
  348. Hashing Your Tables
  349. .PP
  350. Once you have created the necessary tables to support the domains and channels
  351. defined in your runtime tailoring file, you must combine these tables into a
  352. hashed database.  If you defined CH_TB to be 'ch_tbseq', then you can skip
  353. this section.  The \fIdbmbuild\fR program uses the definitions in the runtime
  354. tailoring file to build the hashed database.  
  355. It will report if it finds any tables missing.  See
  356. \fIdbmbuild(8)\fR for details.
  357. .XX
  358. Run \fIdbmbuild\fR (no switches are required -- the default -n is correct).
  359. .NH 2
  360. Testing Your Configuration
  361. .PP
  362. Now test your configuration by running the \fIcheckup\fR
  363. program (see \fIcheckup\fR(8)).  This program will report any inconsistencies
  364. in your installation.  Items marked with asterisks are worthy of note.  Items
  365. in brackets are advisory only.
  366. .XX
  367. Run \fIcheckup\fR.
  368. .PP
  369. Now test your tables by seeing if various addresses are accepted by  
  370. \fIcheckaddr\fR(8) or \fIsend\fR(1).
  371. You may want to give the -W option to
  372. \fIsubmit\fR via \fIsend\fR or the -w option
  373. to \fIcheckaddr\fR.  This will tell you on what channel \*M chose to queue the
  374. message.
  375. .XX
  376. Run \fIcheckaddr\fR or \fIsend\fR to check your tables and configuration.
  377. .PP
  378. If you find
  379. a problem with an address (or more likely, a particular class of addresses), 
  380. you should make the following checks.
  381. Assume as an example that CAMFORD.AC.UK
  382. is in question:
  383. .IP (1)
  384. If there is a domain table for AC.UK, the LHS `CAMFORD' should exist.
  385. If there is no domain table for AC.UK, but there is one for UK, then
  386. LHS `CAMFORD.AC' or `AC' should exist.  Finally if there is no
  387. UK or AC.UK domain table, then on the LHS of the ``top''
  388. table, `UK', `AC.UK', or `CAMFORD.AC.UK' should exist.
  389. It is noted that the required domain should be equal to or a subdomain of
  390. the concatenation of a table key (LHS) and the domain
  391. associated  with the table
  392. (I hope that the
  393. pattern is clear from this).
  394. .IP (2)
  395. Then consider the RHS of the first entry identified above.  This should
  396. be found on the LHS of the appropriate channel and (given that all
  397. domain table RHSs must be unique) not found on the LHS of any inappropriate
  398. channel.  This entry should identify either CAMFORD.AC.UK or the
  399. preferred relay.  (If there are multiple matches, the first one is generally
  400. selected according to the order of channel definitions in the tailoring file).
  401. .IP (3)
  402. These first two criteria should be sufficient to cause the message to
  403. be queued, and the RHS of the channel table entry may be used by
  404. the channel to deliver the message.
  405.